home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir34
/
2boot.zip
/
BOOT.TXT
< prev
next >
Wrap
Text File
|
1994-01-13
|
4KB
|
82 lines
BOOT.BAS
13 January, 1994
6:27 PM
I am away from home this week on "vacation." Yeah... that's it
I'm on VACATION! But what do I do in the evenings when everyone
else has gone to bed dog tired. Me? I'm still up plinking on my
laptop trying to understand the mysteries of how MS-DOS
-really- works.
So here I sit in front of my LCD screen, reading "The Peter
Norton PC Programming Bible," (3rd Edition, Microsoft Press,
1993). I am stumbling over "C" or Assembly code, as if in one
of those Monty Python sketches where this sleazy guy sits next
to you saying, "Know what I mean Governor, nudge, nudge...
wink, wink... know what I mean..." But you DON'T know "what he
means" AND it's still funny.
So I guess I do this -on vacation- because it's FUNNY.
Anyhow and anyways, this is a program that tells you what drive
you booted from no matter if it is A: or B: or C: or D: or...?
Well... it WILL if you are running MS-DOS Version 4.0 or
better. If you have an older version of DOS than 4.0, BOOT.COM
will beep at you and tell you it can't continue.
Believe it or no, BOOT.COM (or its source file, BOOT.BAS) is a
unique QuickBASIC 4.5 program. A unique program in the true
sense of the word (unique n. One of a kind, no other example
exists in the known universe). I have scoured the highways and
byways of QuickBASIC land looking for a program like this...
not because it's so brilliant or hard to do, just that I
thought that it would be a useful utility to have. So in
reading "Norton" this week, I stumbled across "know what I mean
nudge.. nudge... wink, wink... know what I mean...." how to
make this tiny gem and decided to share it with you.
Up until now the only way I could even close to knowing what
the boot disk was by querying:
A$ = ENVIRON$("COMSPEC")
'if the variable is NOT null
IF LEN(A$) THEN BootDrive$ = LEFT$(A$,2)
PRINT "Your Boot Drive is: "; BootDrive$
The Function ENVIRON$ -as used above- finds out where
COMMAND.COM is loaded from AND ASSumes that this is the same as
the boot drive. Well, that was not good enough as some folk use
the SHELL command in the CONFIG.SYS file to move COMMAND.COM
around (Well... I know, =I= do! "know what I mean nudge..
nudge... wink, wink... know what I mean....")
I don't have a network to try it on to see if it correctly
picks that drive up but since it calls an MS-DOS software
interrupt, I suspect it may work for that too. If you try it on
a network and it -works-, would you let me know?
The executable file BOOT.COM, is a plain vanilla QuickBASIC
program LINKed with Crescent Software's PDQ Library and then
compressed with the French FreeWare program LZEXE.EXE to make
it tiny.
BOOT.BAS has a fair amount of information about Registers in
the text portion that you won't find in one spot in one
book.... If you want to know about this CALL INTERRUPT stuff as
it applies to QuickBASIC, then you need to get Ethan Winer's
book "Basic Techniques and Utilities" (Ziff Davis Press 1991)
BEFORE you try the Norton book. "Norton" is written for
Assembly and "C" cats and there is very little help for the
QuickBASIC aficionado.
Get back to me if you like this program or enhance it. Get back
to me if you think this is another dumb program that I have
written that is totally useless, need to know that too... "know
what I mean nudge.. nudge... wink, wink... know what I
mean...."
John De Palma on CompuServe 76076,571